﻿@model IEnumerable<BussinessLogic.Models.Study.StudyListItemModel>
@{
    ViewBag.Title = "Maintenance";
}
<h2>
    @Html.ActionLink("Create New", "Create")</h2>
<p>
    
</p>
@*<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Description
        </th>
        <th>
            Active
        </th>
        <th></th>
    </tr>*@
@foreach (var item in Model)
{
    <div>
        <h2>@item.Name</h2>
        @Html.Raw(@System.Web.HttpUtility.HtmlDecode(item.Description))
        @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
        @Html.ActionLink("Protocol", "Protocol", new { id = item.ID }) |
        @if (!item.IsRunning)
        {
            @Html.ActionLink("Delete", "Delete", new { id = item.ID }) @:|    
        }
        @Html.ActionLink("Download exercise reports", "DownloadExerciseReports", new { id = item.ID }) |
        @Html.ActionLink("Download questionnaire reports", "DownloadQNReports", new { id = item.ID }) 
    </div>
    <hr />
    <br />
}
@*</table>*@ 
